﻿using System;
using Microsoft.Phone.Shell;

namespace XamlMvp
{
    public class PhoneApplicationServiceWrapper : IPhoneApplicationService  
    {
        PhoneApplicationService phoneApplicationService;

        public event EventHandler<ActivatedEventArgs> Activated { add { phoneApplicationService.Activated += value; } remove { phoneApplicationService.Activated -= value; } }

        public event EventHandler<ClosingEventArgs> Closing { add { phoneApplicationService.Closing += value; } remove { phoneApplicationService.Closing -= value; } }

        public event EventHandler<DeactivatedEventArgs> Deactivated { add { phoneApplicationService.Deactivated += value; } remove { phoneApplicationService.Deactivated -= value; } }

        public event EventHandler<LaunchingEventArgs> Launching { add { phoneApplicationService.Launching += value; } remove { phoneApplicationService.Launching -= value; } }

        public System.Collections.Generic.IDictionary<string, object> State
        {
            get { return phoneApplicationService.State; }
        }

        public PhoneApplicationServiceWrapper(PhoneApplicationService phoneApplicationService)
        {
            this.phoneApplicationService = phoneApplicationService;
        }

    }
}
